package top.yi2911.lj_camerax

import android.content.Context
import android.content.Intent

/**
 *Author:liang jian
 *Date:2021-01-18  17:59
 *Description:
 */
class LJCamera {
    var mContext: Context? = null

    var mFeature: CameraxFeature = CameraxFeature.ID_CARD

    /*上下文*/
    fun setContext(context: Context): LJCamera {
        mContext = context
        return this
    }

    /*相机功能*/
    fun setFeatureType(feature: CameraxFeature): LJCamera {
        mFeature = feature
        return this
    }

    fun goFeature() {
        when (mFeature) {
            CameraxFeature.ID_CARD -> mContext?.startActivity(
                Intent(
                    mContext,
                    BaseCameraxActivity::class.java
                )
            )
        }
    }
}